<template>
    <p>这是一个全局组件</p>
    <button @click="addOne">点击加1</button>
    <p>{{ count }}</p>
</template>

<script>
export default{
    name:"GlobalComDemo",
    data(){
        return {
            count: 0
        }
    },
    methods:{
        addOne(){
            this.count++
        }
    }
}
</script>

<style>

/* p{
    color: red;
} */

</style>